<?php

namespace App\Http\Controllers\home;

use Illuminate\Http\Request;

use App\Http\Requests;
use App\Http\Controllers\Controller;
use App\http\Controllers\admin\CateController;
class HomeController extends Controller
{	

   public function Index(){
   	  if(session('web') == 2){
        // 关闭状态
        $webconfig = DB::table('webconfig') -> first();
        return view('home/webconfig/index',['webconfig'=> $webconfig]);
       }else{
   	   $data = CateController::getCatepid(0);
       // dd($data);
    	return view('home/index',['data'=>$data]);
       }

   }
}
